﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SystemConfig.aspx.cs" Inherits="System_SystemConfig"
    MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>系统配置</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabs" class="easyui-tabs">
        <div title="拜访控制">
            <div >
                <table id="wsd_inputtable">
                    <tr>
                        <td class="tabletitle" colspan="6">
                            输入表单
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table  id="wsd_inputtable">
                                <tr>
                                    <td class="tablefield">
                                        定位监测超时:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txt_gpstime" runat="server" Width="57px"></asp:TextBox>
                                        秒<br />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txt_gpstime"
                                            Display="Dynamic" ValidationExpression="^-?(?:(?:60(?:\.0{1,15})?)|(?:(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d{1,15})?))$">输入错误，默认15秒</asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablefield">
                                        纠编范围：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txt_region" runat="server" Width="57px"></asp:TextBox>
                                        米<br />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txt_region"
                                            Display="Dynamic" ValidationExpression="^([0-9]|[0-9][0-9]|[0-9][0-9][0-9]|[0-4][0-9][0-9][0-9]|5000)$">输入错误，请输入0到5000整数</asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablefield">
                                        店内最少拜访时间：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txt_VisitTime" runat="server" Width="57px"></asp:TextBox>
                                        分钟<br />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txt_VisitTime"
                                            Display="Dynamic" ValidationExpression="^[0-9]*[1-9][0-9]*$">输入错误，请输入整数</asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                               
                                 <tr>
                                    <td class="tablefield">
                                        进店偏差照片类型：
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlIntoStore" style="width:150px" runat="server" DataTextField="Name" DataValueField="CODE">
                                        </asp:DropDownList>
                                      
                                       
                                    </td>
                                </tr>
                                 <tr>
                                    <td class="tablefield">
                                        离店偏差照片类型：
                                    </td>
                                    <td>
                                        
                                        <asp:DropDownList ID="ddlLeaveStore" style="width:150px" runat="server" DataTextField="Name" DataValueField="CODE">
                                        </asp:DropDownList>
                                       
                                    </td>
                                </tr>
                            </table>
                        </td>
                    
                        <td>
                            <asp:DataList ID="DataList1" runat="server" RepeatDirection="Vertical" CellPadding="5">
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" Text='<%# Eval("Name") %>' runat="server" />
                                </ItemTemplate>
                                <ItemStyle Font-Size="Small" />
                            </asp:DataList>
                            <asp:HiddenField ID="HiddenField2" runat="server" />
                        </td>
                    </tr>
                </table>
                <br />
                <table id="wsd_inputtable">
                    <tr>
                        <td width="100%" class="tabletitle">
                            操作选项
                        </td>
                    </tr>
                    <tr>
                        <td class="buttonarea">
                            <asp:Button ID="btnSave" runat="server" class="wsd_button2" Text="保 存" OnClick="btnSave_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div title="手机账户捆绑">
            <div>
                <table id="wsd_inputtable">
                    <tr>
                        <td class="tabletitle" colspan="2">
                            输入表单
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                        </td>
                        <td>
                            开启手机与账户捆绑: &nbsp;
                            <asp:CheckBox ID="cbIsBind" runat="server" />
                        </td>
                    </tr>
                </table>
                <br />
                <table id="wsd_inputtable">
                    <tr>
                        <td width="100%" class="tabletitle">
                            操作选项
                        </td>
                    </tr>
                    <tr>
                        <td class="buttonarea">
                            <asp:Button ID="btnSaveBind" runat="server" class="wsd_button2" Text="保  存" OnClick="btnSaveBind_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function Check() {
            var region = $("#<%=txt_region.ClientID %>");
            alert(region.val());
            var regex = /^[0-9]+$/;
            if (!regex.test(region.val()))
                $("#spanerr").html("值必须为整数！");
            else if (parseInt($("#<%=txt_region.ClientID %>").val()) > 5000)
                $("#spanerr").html("范围必须在0到500之间");

        }
    </script>
</asp:Content>
